<!--{eval $_TPL['titles'] = array('活动 - 首页');}-->
<!--{template header}-->
<style type="text/css">
@import url(action/view/default.css);
</style>
<style>
.dialog-advanced .bd {background:#FFFFFF none repeat scroll 0 50%;}
.album_list img {background:#FFFFFF none repeat scroll 0 0;border:1px solid #CCCCCC;padding:3px;}
#show_left{top:33px;left:0px;width:0px;height:0px;margin:0;padding:0;background:#000000;position:absolute;text-align:center;opacity:0;filter:alpha(opacity=0);}
#show_right{top:33px;right:0px;width:0px;height:0px;margin:0;padding:0;background:#000000;position:absolute;text-align:center;opacity:0;filter:alpha(opacity=0);}
</style>
<link rel="stylesheet" href="action/view/lightbox.css" type="text/css" media="screen" />
<script type="text/javascript" src="action/view/prototype.js"></script>
<script type="text/javascript" src="action/view/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="action/view/lightbox.js"></script>
<script type="text/javascript" src="action/view/base.js"></script>
<script type="text/javascript" src="action/view/upload.js"></script>
<script type="text/javascript">
function del_img(pid){
	AJAX.request('action.php?ac=ajax&op=delete_album&pid='+pid,{method: 'post',parameters:'myFormAc=update',onComplete	: function(resp){
		window.location.href = 'action.php?ac=album&id={$id}&op=admin';
	}});
}
</script>
<h2 class="title"><img src="image/app/event.gif"/>活动</h2>
<div class="h_status">
	<a href="action.php?ac=show&id={$id}">返回活动</a><span class="pipe">|</span><a href="#" onclick="return action.upload({$id});">添加新图片</a><!--{if $uid == $data['uid'] || $uid == ADMIN_UID}--><span class="pipe">|</span><!--{if $op=='admin'}--><a href="action.php?ac=album&id={$id}">返回活动照片</a><!--{else}--><a href="action.php?ac=album&id={$id}&op=admin">管理</a><!--{/if}--><!--{/if}-->
</div>

<div class="d_content" id="photo_list">
	<table width="100%" cellspacing="6" cellpadding="0" class="album_list">
		<tbody>
		<!--{if $op == 'admin'}-->
		<!--{loop $album $key $val}-->
			<!--{if $key % 4 == 0 }--><tr><!--{/if}-->
				<td align=center valign=middle>
					<img alt="{$val['title']}" src="{$val['img']}_s.{$val['ext']}" /><br /><br />
					<input type="button" value="删除" onclick="del_img($val['pid'])" class='submit'/>
				</td>
			<!--{if $key % 4 == 3 }--></tr><!--{/if}-->
		<!--{/loop}-->
		<!--{else}-->
		<!--{loop $album $key $val}-->
			<!--{if $key % 4 == 0 }--><tr><!--{/if}-->
				<td align=center valign=middle>
					<a href="{$val['img']}"  rel="lightbox[roadtrip]"><img alt="{$val['title']}" src="{$val['img']}_s.{$val['ext']}" /></a>
				</td>
			<!--{if $key % 4 == 3 }--></tr><!--{/if}-->
		<!--{/loop}-->
		<!--{/if}-->
		</tbody>
	</table>
</div>
<div class="f_status f_status_w s_clear">
	<a href="javascript:;" onclick="window.scrollTo(0,0);" id="a_top" title="TOP">TOP</a>
</div>
<!--{template footer}-->